<?php
include_once "class\HashTable.php";
include_once "func/rand.php";

$rand_num=200;
$rand_list=randUniqueIntList2($rand_num);
echo "[".implode(",",$rand_list)."]\r\n";

$hash_table=new HashTable();
foreach($rand_list as $index => $item){
    $hash_table->insert($item);
}
echo $hash_table->output();

//查找
for($i=0;$i<10;$i++){
    $index=rand(0,$rand_num);
    $key=$rand_list[$index];
    $hash=$hash_table->find($key);
    echo "index:$hash,key:$key\r\n";
}

